import 'package:hrf_app/common/api/project/project.dart';
import 'package:hrf_app/common/models/notebook/MkNotebookModel.dart';
import 'package:get/get.dart';

class NotebookPreviewController extends GetxController {
  NotebookPreviewController();

  late MkNotebookModel mkNotebookModel = MkNotebookModel();

  _initData() {
    String id = Get.arguments;
    ProjectApi.getMkNotebookByIdApi({"id": id}).then((res) {
      if (res["code"] == "00000") {
        mkNotebookModel = MkNotebookModel.fromJson(res["data"]);
        update(["notebook_preview"]);
      }
    });
  }

  void onTap() {}

  @override
  void onReady() {
    super.onReady();
    _initData();
  }

// @override
// void onClose() {
//   super.onClose();
// }
}
